package com.dsp.bean;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.AccessType;

import com.core.util.BaseBean;

@Entity
@Table(name = "jms")
public class Jms extends BaseBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2816142143824706189L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@AccessType(value = "property")
	@Column(name = "id")
	private Long id;

	/**
	 * 消息类别
	 * 1:推送 2:mail 3 既推送又mail
	 */
	@AccessType(value = "property")
	@Column(name = "jms_type")
	private Long jmsType;

	@AccessType(value = "property")
	@Column(name = "link_to")
	private String linkTo;
	/**
	 * 消息内容
	 */
	@AccessType(value = "property")
	@Column(name = "jms_content")
	private String jmsContent;
	/**
	 * 用户
	 */
	@AccessType(value = "property")
	@Column(name = "user_id")
	private Long userId;
	
	/**
	 * 是否已查看
	 */
	@AccessType(value="property")
	@Column(name = "status")
	private Long status = 0L;
	
	/**
	 * 排入任务队列的时间
	 */
	@AccessType(value = "property")
	@Column(name = "jobs_time")
	private Timestamp jobsTime ;
	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @return the jmsType
	 */
	public Long getJmsType() {
		return jmsType;
	}

	/**
	 * @return the linkTo
	 */
	public String getLinkTo() {
		return linkTo;
	}

	/**
	 * @return the jmsContent
	 */
	public String getJmsContent() {
		return jmsContent;
	}

	/**
	 * @return the userId
	 */
	public Long getUserId() {
		return userId;
	}

	/**
	 * @return the status
	 */
	public Long getStatus() {
		return status;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @param jmsType the jmsType to set
	 */
	public void setJmsType(Long jmsType) {
		this.jmsType = jmsType;
	}

	/**
	 * @param linkTo the linkTo to set
	 */
	public void setLinkTo(String linkTo) {
		this.linkTo = linkTo;
	}

	/**
	 * @param jmsContent the jmsContent to set
	 */
	public void setJmsContent(String jmsContent) {
		this.jmsContent = jmsContent;
	}

	/**
	 * @param userId the userId to set
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(Long status) {
		this.status = status;
	}

	/**
	 * @return the jobsTime
	 */
	public Timestamp getJobsTime() {
		return jobsTime;
	}

	/**
	 * @param jobsTime the jobsTime to set
	 */
	public void setJobsTime(Timestamp jobsTime) {
		this.jobsTime = jobsTime;
	}
	
}
